home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 2,401 to 2,500 / aol-file-protocol-4400-2401-to-2500.zip / AOLDLs / PC Business Library / MLM Database Program / DHERB.exe / HLDEMO / SPLASH.SC < prev    next >
Text File  |  1993-09-23  |  4KB  |  106 lines

  1.  
  2. 1  ;The Splshscr script
  3. 2  PROC CLOSED SplashScreen()
  4. 3  USEVARS autolib
  5. 4  line = 3         ;starting line for the text
  6. 5  pause = 10       ;controls speed of the animation
  7. 6  strlen = 0       ;holds length of longest array string
  8. 7  atline = line    ;save the line for use later
  9. 8  size = 20        ;size of the array
  10. 9  
  11. 10 ;=========================================================
  12. 11 margin = 78      ;78 with canvas border
  13. 12 ;; margin=79     ;79 without canvas border
  14. 13 ;=========================================================
  15. 14 
  16. 15 ARRAY str[size]  ;note the trailing spaces on all nonblank lines
  17. 16 str[1]  = "COMPANY OR APPLICATION NAME"
  18. 17 str[2]  = "Version Number - Distribution Date"
  19. 18 str[3]  = ""
  20. 19 str[4]  = "(C) Your Company's Copyright Notice"
  21. 20 str[5]  = "All Rights Reserved"
  22. 21 str[6]  = ""
  23. 22 str[7]  = "Designed & Written by Steven Berretta"
  24. 23 str[8]  = "212 522-5146"
  25. 24 str[9]  = ""
  26. 25 str[10] = ""
  27. 26 str[11] = ""
  28. 27 str[12] = ""            ;nulls are skipped, just placeholders
  29. 28 str[13] = ""
  30. 29 str[14] = ""
  31. 30 str[15] = ""
  32. 31 str[16] = ""
  33. 32 str[17] = ""
  34. 33 str[18] = ""
  35. 34 str[19] = ""
  36. 35 str[20] = "With Special Thanks to Patricia Gilleran"
  37. 36 FOR t FROM 1 TO size
  38. 37 IF(LEN(STR[t]) > strlen) THEN
  39. 38 strlen = LEN(str[t])
  40. 39 ENDIF
  41. 40 ENDFOR     ;Now, strlen holds the length of the longest line
  42. 41 
  43. 42 InitScreenAndLogo(margin, line)  ;initialize screen and place logo
  44. 43 FOR element FROM 1 TO size
  45. 44 SetTheStyle(element)
  46. 45 strsiz = 1
  47. 46 length = LEN(str[element])
  48. 47 
  49. 48 ;============================================================
  50. 49 ; NOTE: Select a FOR loop from the three below.
  51. 50 ;       Remember to match your FOR loop selection with the
  52. 51 ;       the selection of "@ atline..." statements below
  53. 52 ;------------------------------------------------------------
  54. 53 ; Loop 1: center the text      --Style 1, line X
  55. 54 ; Loop 2: right-justify the text --Style 2, line Y
  56. 55 ; Loop 3: left-justify the text --Style 3, line Z
  57. 56 FOR column FROM margin TO INT((20+((strlen-length)/2))) STEP -1
  58. 57 ;;FOR column FROM margin TO INT((20+(strlen-length))) STEP -1
  59. 58 ;; fOR margin TO 20 STEP -1
  60. 59 ;=============================================================
  61. 60
  62. 61  IF(length = 0) THEN
  63. 62   QUITLOOP
  64. 63  ENDIF
  65. 64  IF(CHARWAITING()) THEN  ; stop animation if user pressed key
  66. 65  z = GETCHAR()
  67. 66  CANVAS OFF
  68. 67  InitScreenAndLogo(margin, line)   ; display graphic
  69. 68  atline = line -1
  70. 69  FOR element FROM 1 TO size
  71. 70  SetTheStyle(element)     ; set the color for this element
  72. 71  length = LEN(str[element])
  73. 72  
  74. 73  ;============================================================
  75. 74  ;Style 1: center the text using column 20 as the left margin
  76. 75  ;Style 2: the text is right-justified
  77. 76  ;Style 3: the text is left-justified
  78. 77  ;------------------------------------------------------------
  79. 78  @atline + element, int((20 + ((strlen - length) /2)))
  80. 79  ;;@atline + element, int((20 + (strlen - length)))
  81. 80  ;;@atline + element, 20
  82. 81  ;=============================================================
  83. 82  
  84. 83  ?? str[element]
  85. 84  ENDFOR
  86. 85  CANVAS ON
  87. 86  QUITLOOP
  88. 87  EDIF
  89. 88  @atline, column
  90. 89  IF(strsiz < length) THEN  ; show partial string if offscreen
  91. 90  ?? SUBSTR( str[element], 1, strsiz)
  92. 91  strsiz = strsiz + 1   ; build the string as it moves left
  93. 92  ELSE
  94. 93  ?? str[element]   ;show whole string if not off screen
  95. 94  ENDIF
  96. 95  SLEEP pause
  97. 96  ENDFOR
  98. 97  atline = atline + 1
  99. 98  ENDFOR
  100. 99  WHILE(CHARWAITING() = False)
  101. 100 ENDWHILE
  102. 101 IF(GETCHAR() = 27) THEN  ; if ESC key then quit application
  103.  
  104.  
  105.  
  106.